Skip to content

ascat raw segments txt files added to output#126

Merged
AmberVerhasselt merged 5 commits intoIntGenomicsLab:devfrom
AmberVerhasselt:dev
Feb 9, 2026
Merged

ascat raw segments txt files added to output#126
AmberVerhasselt merged 5 commits intoIntGenomicsLab:devfrom
AmberVerhasselt:dev

Conversation

@AmberVerhasselt
Copy link

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

Copilot AI review requested due to automatic review settings February 6, 2026 16:27
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the nf-core ascat module to include the raw segmentation table (*.segments_raw.txt) as an explicit module output, and documents that additional output in the pipeline results documentation.

Changes:

  • Add segments_raw to the ASCAT module test snapshots (main.nf.test) to validate the new output.
  • Fix/ensure the segments_raw file is written with the correct prefix interpolation in the module R script, and create a stub segments_raw file in stub mode.
  • Document sample.segments_raw.txt in docs/output.md.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
modules/nf-core/ascat/tests/main.nf.test Extends snapshot assertions to include the new segments_raw output.
modules/nf-core/ascat/main.nf Writes ${prefix}.segments_raw.txt (guarded) and includes it in stub outputs.
modules/nf-core/ascat/ascat.diff Regenerates the recorded module diff to reflect the segments_raw additions.
docs/output.md Adds sample.segments_raw.txt to the documented pipeline outputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 54 to 60
// This discrepancy affect the png generated
process.out.png.collect{it[1].collect{file(it).name}},
process.out.purityploidy,
process.out.segments,
process.out.segments_raw,
process.out.versions,
path(process.out.versions[0]).yaml
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snapshot(...).match() snapshots are order/arity sensitive. This test adds process.out.segments_raw to the snapshot inputs, but the corresponding modules/nf-core/ascat/tests/main.nf.test.snap file was not updated, so these tests will fail until the snapshot is re-recorded/updated to include the new output (or the snapshot assertion is adjusted).

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AmberVerhasselt Normally, if you change anything in the test (now you added an additional file that needs to exist after testing), the test should be updated.

Modules are typically tested to see if the output matches a previous test run (=snapshot). If you change anything in the module/test assertion, if will no longer match this snapshot.
You can test a module by running nf-core modules test ascat --profile singularity if you need to update the snapshot that it will compare to you can run it nf-core modules test ascat --profile singularity --update. Since ASCAT is not in the test config, we can ignore this now. So use this as an FYI for future module updates.

docs/output.md Outdated
| `sample.normal_alleleFrequencies_chr(1-22,X).txt` | a tsv file describing the snp counts for the normal sample at each position and their respective depths |
| `sample.purityploidy.txt` | a tsv file describing the purity and ploidy values of the sample |
| `sample.segments.txt` | a tsv file describing each chromosome segment and it's major and minor copy number |
| `sample.segments_raw.txt` | a tsv file describing each chromosome segment and it's major and minor rounded and raw copy number |
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new sample.segments_raw.txt description has a grammar issue (“it's” → “its”) and reads ambiguously (“rounded and raw copy number”). Consider rewording to something like “... its major/minor copy numbers (rounded and raw)” and trimming the extra spacing so the markdown table stays aligned.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@ljwharbers ljwharbers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once all tests pass (can ignore template version test), feel free to merge.

Comment on lines 54 to 60
// This discrepancy affect the png generated
process.out.png.collect{it[1].collect{file(it).name}},
process.out.purityploidy,
process.out.segments,
process.out.segments_raw,
process.out.versions,
path(process.out.versions[0]).yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AmberVerhasselt Normally, if you change anything in the test (now you added an additional file that needs to exist after testing), the test should be updated.

Modules are typically tested to see if the output matches a previous test run (=snapshot). If you change anything in the module/test assertion, if will no longer match this snapshot.
You can test a module by running nf-core modules test ascat --profile singularity if you need to update the snapshot that it will compare to you can run it nf-core modules test ascat --profile singularity --update. Since ASCAT is not in the test config, we can ignore this now. So use this as an FYI for future module updates.

@AmberVerhasselt AmberVerhasselt merged commit 153bc09 into IntGenomicsLab:dev Feb 9, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants